﻿<UserControl x:Class="AmazingWPFControls.Showcase.AnimatedExpanderTab"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:controls="http://blog.lexique-du-net.com/wpf/AmazingWPFControls"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" d:DesignHeight="300"
      d:DesignWidth="300">
   <Grid>
      <Grid.ColumnDefinitions>
         <ColumnDefinition Width="0.492*" />
         <ColumnDefinition Width="0.508*" />
      </Grid.ColumnDefinitions>
      <Grid.RowDefinitions>
         <RowDefinition Height="0.143*" />
         <RowDefinition Height="0.857*" />
      </Grid.RowDefinitions>
      <!--DESCRIPTION TEXT-->
      <TextBlock Style="{DynamicResource DescriptionStyle}" HorizontalAlignment="Center" TextAlignment="Center"
            VerticalAlignment="Center" Foreground="{DynamicResource ColorAccentOverBrush}" FontSize="16"
            Grid.ColumnSpan="2"><TextBlock.Background>
        				<ImageBrush />
        			</TextBlock.Background><Run
               Text="The expander control can be used in a lot of situations but the one proposed by default is quite &quot;rigid&quot;. " /><Run
               Language="fr-fr" /><LineBreak /><Run Language="fr-fr"
               Text="We have so added a few animations when collapsing of ellaspsing" /><LineBreak /><Run /></TextBlock>

      <!--CLASSIC EXPANDER-->
      <StackPanel Orientation="Vertical" Grid.Row="1" d:LayoutOverrides="Height" VerticalAlignment="Top">
         <TextBlock TextWrapping="Wrap" Style="{DynamicResource Heading3}" HorizontalAlignment="Center"
               Margin="0,0,0,11"><Run Language="fr-fr" Text="Normal Expander" /></TextBlock>
         <Border BorderBrush="{DynamicResource ControlBackgroundNormalOrange}" BorderThickness="6" CornerRadius="3"
               Width="450" HorizontalAlignment="Center" VerticalAlignment="Center">

            <Expander IsExpanded="True" Header="This is a pretty header"
                  Background="{DynamicResource ControlBackgroundOver}" Style="{x:Null}">
               <!--We force the classic template as the one in SL does not works :-(-->
               <Grid Background="{DynamicResource HyperlinkBrush}" Width="450" Height="400">
                  <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="36"><Run
                           Language="fr-fr" Text="Expanded" /><LineBreak /><Run Language="fr-fr" /></TextBlock>
               </Grid>
            </Expander>
         </Border>
      </StackPanel>

      <!--ANIMATED EXPANDER-->
      <StackPanel Grid.Column="1" Orientation="Vertical" Grid.Row="1" d:LayoutOverrides="Height" VerticalAlignment="Top">
         <TextBlock TextWrapping="Wrap" Style="{DynamicResource Heading3}" HorizontalAlignment="Center"
               Margin="0,0,0,11"><Run Language="fr-fr" Text="Animated Expander" /></TextBlock>
         <Border BorderBrush="{DynamicResource ControlBackgroundNormalOrange}" BorderThickness="6" CornerRadius="3"
               HorizontalAlignment="Center" VerticalAlignment="Center" Width="450">
            <controls:AnimatedExpander Header="This is a pretty header" IsExpanded="True" ExpandDirection="Down"
                  Background="{DynamicResource ControlBackgroundOver}" VerticalAlignment="Top">
               <Grid Background="{DynamicResource HyperlinkBrush}" Width="450" Height="400">
                  <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="36"><Run
                           Language="fr-fr" Text="Expanded" /><LineBreak /><Run Language="fr-fr" /></TextBlock>
               </Grid>
            </controls:AnimatedExpander>

         </Border>
      </StackPanel>
   </Grid>
</UserControl>
